# html_downloader.py
"""
Download html by url
:author: antony zhao
:date: 24/3/2020
"""

import urllib.request


# the class for downloading web page
class HtmlDownloader(object):

    @staticmethod
    def download(url):
        """
        function for downloading web page
        :param url: the url of web page
        :return: response: the str of html code
        """
        if url is None:
            return None
        response = urllib.request.urlopen(url).read()
        return response

